import request from '@/utils/request'

// 查询旅游标签列表
export function listTag(query) {
  return request({
    url: '/travel/tag/list',
    method: 'get',
    params: query
  })
}

// 查询旅游标签详细
export function getTag(tagId) {
  return request({
    url: '/travel/tag/' + tagId,
    method: 'get'
  })
}

// 新增旅游标签
export function addTag(data) {
  return request({
    url: '/travel/tag',
    method: 'post',
    data: data
  })
}

// 修改旅游标签
export function updateTag(data) {
  return request({
    url: '/travel/tag',
    method: 'put',
    data: data
  })
}

// 删除旅游标签
export function delTag(tagId) {
  return request({
    url: '/travel/tag/' + tagId,
    method: 'delete'
  })
}
//获取标签大类枚举
export function getTagCategoryList() {
  return request({
    url: '/travel/tag/getTagCategoryList',
    method: 'get'
  });
}//获取标签类型枚举
export function getTagTypeList() {
  return request({
    url: '/travel/tag/getTagTypeList',
    method: 'get'
  });
}

// 查询标签列表
export function getTagNameList(query) {
  return request({
    url: '/travel/tag/listFromAttraction',
    method: 'get',
    params: query
  })
}

// 查询旅游标签列表
export function listByCategory(query) {
  return request({
    url: '/travel/tag/listByCategory',
    method: 'get',
    params: query
  })
}